package model.model01.demo02;

import com.model.model01.demo02.utils.Operate;

import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        try{
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入第一个数字: ");
            String number1 = sc.next();

            System.out.println("请输入运算符: ");
            String operate = sc.next();

            System.out.println("请输入第二个数字: ");
            String number2 = sc.next();

            double result = Operate.GetResult(number1, operate, number2);

            System.out.println("运算结果：" + result);
        } catch (Exception e) {
            System.out.println("程序异常：" + e.getMessage());
        }
    }
}
